@layout("/common/_curd/_container.html"){

<script type="text/javascript">
	var ctx = "${basePath}";
	var grid_selector = "#grid-table";
	var pager_selector = "#grid-pager";
	
	$(function(){
		initGrid();
		initMenuBtn("btns", "${code}");
	});
	
	function initGrid(){
		var grid_url = ctx + "/${code}/list";
		var _colnames = ["ID", 
						/* "所属数据源",  */
						"队列类型编号", 
						"队列类型名称", 
						"显示别名", 
						"报道", 
						"预分诊", 
						"重新排号", 
						"预约", 
						"预留号码", 
						"过号首位惩罚", 
						"过号叫号间隔", 
						"过号自动重置次数"];
		var _colmodel = [{name:"queue_type_id", index:"queue_type_id", width:100},
						/* {name:"db_source_id", index:"db_source_id", width:100}, */
						{name:"source_id", index:"source_id", width:100},
						{name:"name", index:"name", width:100},
						{name:"displayname", index:"displayname", width:100},
						{name:"is_checkin", index:"is_checkin", width:100},
						{name:"is_pretriage", index:"is_pretriage", width:100},
						{name:"is_reorder", index:"is_reorder", width:100},
						{name:"is_reserve", index:"is_reserve", width:100},
						{name:"reserve_numlist", index:"reserve_numlist", width:100},
						{name:"pass_first_flag", index:"pass_first_flag", width:100},
						{name:"pass_flag_step", index:"pass_flag_step", width:100},
						{name:"pass_max", index:"pass_max", width:100}
						];
		
		jQuery(grid_selector).jqGrid({
			url : grid_url,
		    shrinkToFit : true,
			colNames : _colnames,
			colModel : _colmodel, 
			jsonReader : {id :"queue_type_id"},
			pager : pager_selector,
			postData : {sort : "queue_type_id", order : "desc"}
		});
	}
</script>


	<!-- 配置 grid -->
	<div class="row">
		<div class="col-xs-12 tb-grid">
			<!-- 配置 查询 -->
			@ var _col=[
			@		{name:"ID", index:"queue_type_id", type:"text"},
			@		{name:"队列类型编号", index:"db_source_id", type:"text"},
			@		{name:"所属数据源", index:"source_id", type:"text"},
			@		{name:"队列类型名称", index:"name", type:"text"},
			@		{name:"显示别名", index:"displayname", type:"text"},
			@		{name:"报道", index:"is_checkin", type:"text"},
			@		{name:"预分诊", index:"is_pretriage", type:"text"},
			@		{name:"重新排号", index:"is_reorder", type:"text"},
			@		{name:"预约", index:"is_reserve", type:"text"},
			@		{name:"预留号码", index:"reserve_numlist", type:"text"},
			@		{name:"过号首位惩罚", index:"pass_first_flag", type:"text"},
			@		{name:"过号叫号间隔", index:"pass_flag_step", type:"text"},
			@		{name:"过号自动重置次数", index:"pass_max", type:"text"}
			@];
			@ include("/common/_function/_search.html",{"col":_col}){}
			<!-- 按钮 -->
			<div class="welljq well-sm" id="btns"></div>
			<!-- grid -->
			<table id="grid-table"></table>
			<!-- 分页-->
			<div id="grid-pager"></div>
		</div>
	</div>
	
	<!-- 引入所需的js -->
	@include("/common/_listscript.html"){}
	
@}	